package com.hzit.order.service.impl;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.conditions.query.QueryChainWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hzit.order.dao.AddressDao;
import com.hzit.order.entity.TbAddress;
import com.hzit.order.service.AddressService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * 类名：
 * 作者：WF
 * 功能：
 */
@Service
public class AddressServiceImpl extends ServiceImpl<AddressDao, TbAddress> implements AddressService {
	//1. 根据登录名得到地址列表
	@Override
	public List<TbAddress> findAddresListByName(String name) {
		return new QueryChainWrapper<>(this.baseMapper)
									.eq("user_id", name)
									.list();
	}
}
